#ifndef CATEGARY_H
#define CATEGARY_H

#include <QObject>
#include <QList>
#include <QMap>

class Categary : public QObject
{
    Q_OBJECT
public:
    enum PROPERTY {
        TITLE = 1,
        DESC,
        SPACE_ID,
        PRIVACY
    };

    explicit Categary();
    ~Categary();
    Categary(const QString &id);

    bool hasSubCategory();

    QString getId();
    QString getTitle();
    QString getDescription();
    QString getSpaceId();
    QString getPrivacy();

    QString getProp(PROPERTY prop);
signals:
    
public slots:
    void addSubCategory(Categary *categary);
    void setProp(const QString &val, PROPERTY prop);

    void setId(const QString &id);
    void setTitle(const QString &title);
    void setDescription(const QString &desc);
    void setSpaceId(const QString &spaceId);
    void setPrivacy(const QString &privacy);
protected:
    QString id;
    QList<Categary *> *subCategary;
private:
    QMap<QString, QString> *props;
};

#endif // CATEGARY_H
